
Replication Files and Supplemental Materials for: 

    The 2020 Presidential Election and Ally Perceptions of the US: A Natural Experiment in Japan
    
    Eddie Hearn

Stata: Last Tested 03/30/2023 [Stata 17] Unix*
    
    election-raw.csv: comma delimited data file


    replication.do: Stata 17 .do file to replicate analysis 
        --input files:   election-raw.csv  graphs.py
        --replication.do will generate a "stata-replication" directory and 3 sub directories "figures" "tables" and "data"
        --output    
                    stata-replication/
                        data/
                            graphs.csv  sim_us_depend.dta   sim_us_infl.dta   sim_us_trust.dta
                        figures/
                            us_depend.svg    us_infl.svg      us_trust.svg    ldp_us_depend.svg    ldp_us_infl.svg    dp_us_trust.svg   mef_us_depend.svg   mef_us_infl.svg     mef_us_trust.svg
                        tables/
                            balance.tex/txt     descrip.tex/txt     index.tex/txt       main.tex/txt  
                        elec-log.log


    graphs.py: Python script creating figures called from do-file 
        --save graphs.py to working directory with election-raw.csv and replication.do to generate graphs with python
        --replication.do will generate generic graphs in Stata if python3 is unavailable or fails


    replication.log: Log file from running replication.do
   

Python:Last Tested 3/30/2023 [python3] 

    py-data.csv: comma delimited data file
    
    replication.py: python script to replicate main findings (Table 2) and graphs (fig 1-4)
        --input file    py-data.csv
        --replication.py will generate a "py-replication" directory
         --output    
                    py-replication/
                        us_depend.svg  us_infl.svg    us_trust.svg  ldp_us_depend.svg  ldp_us_infl.svg     dp_us_trust.svg     summary.txt
                                

Supplemental.pdf: Supplemental materials




